package com.powernode.teatraceability.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigInteger;
import java.util.Date;

/**
 * ClassName: ProductCertificateVo
 * Description:
 *
 * @Author: jdz
 * @Create: 2023/4/27 - 15:18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProductCertificateVo {
    private Integer id;
    private String Address;
    private String cpmc;

    private String qymc;

    private String certificateType;

    private String certificateMaterial;
    private BigInteger certificateTime; // 认证时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date expireTime;
    private boolean status; // 认证状态
    private String certificate;
    private Integer proIndex;

    public ProductCertificateVo(String address, String cpmc, String _certificateType, String _certificateMaterial, BigInteger certificateTime, boolean certificateStatus, String qymc) {
        Address = address;
        this.cpmc = cpmc;
        this.qymc = qymc;
        this.certificateType = _certificateType;
        this.certificateMaterial = _certificateMaterial;
        this.certificateTime = certificateTime;
        this.status = certificateStatus;
    }
}
